package com.guanlixitong.service.impl;

import com.guanlixitong.dao.IUserDao;
import com.guanlixitong.factory.Factory;
import com.guanlixitong.service.IUserService;

import java.io.BufferedReader;
import java.io.IOException;
import java.util.Scanner;

public class UserServiceImpl implements IUserService {

    private IUserDao userDao= Factory.getUserDao();

    //注册
    @Override
    public boolean ZhuCePanDuan(String s, String username, String password, String phone) throws IOException {
        userDao.ZhuCePanDuan( s, username, password, phone);
        return true;
    }

    //登录
    @Override
    public boolean loginpanduan(Scanner sc, int count) throws IOException, InterruptedException {
        boolean flag = userDao.loginpanduan(sc, count);
        return flag;
    }

    //修改密码
    @Override
    public void XiuGaiMiMa(Scanner sc, String s, String number, BufferedReader fw1) throws IOException {
        userDao.XiuGaiMiMa(sc, s, number, fw1);
    }

}
